package ooday02;

class Teacher extends Person{
    double salary;

    public Teacher(String name,int age,String address,String occupation,double salary){
        super(name, age, address, occupation);
        this.salary = salary;
    }


    @Override
    void sayHi() {
        System.out.println("各位同学好，我叫"+name+"这学期由我来教这门课程");
    }

    void teach(){
        System.out.println(name+occupation+"正在教小朋友");
    }
}